<?php
return CMap::mergeArray(
    require(dirname(__FILE__).'/main.php'),
    array(
        'id'  => 'front',
        'controllerPath'=>_APP_PATH_.DIRECTORY_SEPARATOR."protected".DIRECTORY_SEPARATOR."controllers".DIRECTORY_SEPARATOR."front",
        'viewPath'=>_APP_PATH_.DIRECTORY_SEPARATOR."protected".DIRECTORY_SEPARATOR."views".DIRECTORY_SEPARATOR."front",
        'defaultController'=>'site',

        'components'=>array(
            'urlManager'=>array(
                'urlSuffix'=>'.html',
                'rules'=>array(
                    'gioi-thieu'=>'article/about',
                    'lien-he'=>'site/Contact',
                    'tin-tuc'=>'aritcle/list',
                    'dien-thoai'=>'product/index',
//                    '<c:[a-zA-Z0-9_-]+>'=>'article/list',
//                    '<c:[a-zA-Z0-9_-]+>/<url_key:[a-zA-Z0-9_-]+>'=>'article/view',
//                    '<url_key:[a-zA-Z0-9_-]+>'=>'article/view',
                    //san pham
                    '<url_key:[a-zA-Z0-9_-]+>-<id:[0-9_-]+>c.html' => 'product/listByCategory',//list by category
                    '<url_key:[a-zA-Z0-9_-]+>-<id:[0-9_-]+>d.html' => 'product/detail',
                    
                    
                    '<_c:\w+>/<_a:\w+>'=>'<_c>/<_a>',
                ),
                'showScriptName'=> false,
            ),

            // error handler
            'errorHandler'=>array(
                'errorAction'=>'site/error',
            ),

//            'clientScript'=>array(
//                'class'=>'application.extensions.minify.MinifyClientScript',
//                'combineFiles'=>true,
//                'compressCss'=>true,// bật chế độ tối ưu hoá css
//                'compressJs'=>true,// bật chế độ tối ưu hoá js
//            ),
             'request'=>array(
                'enableCsrfValidation'=>true,
                'enableCookieValidation'=>true,
            ),
        ),
        
        //Module
        'modules'=>array(),
        // autoloading model and component classes
        'import'=>array(
            'application.models.admin.*',
            'application.models.front.*',
            'application.components.front.*',
        ),

        'params'=>array(
           "copyRight"=>"Copyright @ 2013 Le Van Chien. All rights reserved.",
            "mailSuppor"=>'levanchien.it@gmail.com',
            'systemAdminEmail'=>'levanchien.it@gmail.com',
            'listArticlePerPage' => '10',
            'htmlMetadata'=>array(
                'title'=>'VTphone.vn',
                'keywords'=>'VTphone.vn',
                'description'=>'VTphone.vn',
            ),
        ),
    )
);
?>